const {merge}=require("webpack-merge")
const common=require("./webpack.common.js")
const webpack=require("webpack")

module.exports=merge(common,{
    mode:"development",
    devtool:"eval-cheap-module-source-map", 
    devServer:{
        contentBase:"./public", //用来读取public中没被打包的favicon.icon
        hot:true, //开启热更新
    },
    plugins:[
        new webpack.HotModuleReplacementPlugin() //热更新插件
    ],
    target:"web", //webpack5必须加上这个 ，浏览器才会自动更新
    
})